package com.wcs.exam.controller.admin.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wcs.exam.common.base.annotation.SchemaEnum;
import com.wcs.exam.common.enums.MenuTypeEnum;
import com.wcs.exam.common.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * Admin-菜单信息-列出响应对象
 * </p>
 *
 * @author wcs
 * @since 2024-07-06
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(description = "Admin-菜单信息-列出-响应对象")
public class AdminSysMenuListResp implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "父ID")
    private Long parentId;

    @Schema(description = "是否显示")
    private Boolean isShow;

    @Schema(description = "使用布局(1使用，0禁用)")
    private Boolean isLayout;

    @SchemaEnum(value = MenuTypeEnum.class)
    private Integer menuType;

    @Schema(description = "菜单名称")
    private String menuName;

    @Schema(description = "菜单图标")
    private String menuIcon;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "后端接口")
    private String apis;

    @Schema(description = "前端权限")
    private String permission;

    @Schema(description = "备注")
    private String remark;

    @SchemaEnum(value = StatusEnum.class, description = "状态")
    private Integer status;

    @Schema(description = "排序")
    private Integer sort;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime gmtCreate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "修改时间")
    private LocalDateTime gmtModified;

    /**
     * 下级菜单集合
     */
    private List<AdminSysMenuListResp> childrenList;
}
